package com.it.myh;

import java.util.Calendar;
import java.util.Date;

/**
 * @Description: // 类说明，在创建类时要填写
 * @ClassName: Od_0205_02    // 类名，会自动填充
 * @Author: MYH          // 创建者
 * @Date: 2023/2/5 18:45   // 时间
 * @Version: 1.0     // 版本
 */
public class Od_0205_02 {

    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.get(Calendar.DAY_OF_MONTH));
        String s1 = "123";
        //getTime:日历类--->Date类
        Date time = calendar.getTime();
        System.out.println(time);

        Date date = new Date();
        //setTime:Date类--->日历类
        calendar.setTime(date);
        System.out.println(Calendar.DAY_OF_WEEK);
    }
}
